import http from '@/utils/http'

/**
 * 获取音乐
 * @param params
 * @constructor
 */
export const SongListService = (params:songs_params) => {
    return http.get('/api/songs' ,{params: params })
}

/**
 * 增加音乐计数
 * @param id
 */
export const interactionMusicService = (id: string) => {
    return http.post('/api/interaction/play' ,{ song: id })
}

export const songInfoService = (id: string) => {
    return http.get(`/api/song/${id}/info`)
}


export const songMyLikeService = () => {
    return http.get(`/api/songs/favorite`)
}

export const songRecentlyService = () => {
    return http.get("/api/songs/recently-played")
}

export const setSongLikeService = (id: string) => {
    return http.post('/api/interaction/like' ,{ song: id })
}

export const setSongsLikeService = (ids: string[]) => {
    return http.post('/api/interaction/batch/like' ,{ songs: ids })
}